package sslsockets;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;

import server.Server;

public class RegistrationServer
{
    public static void main( String[] args ) throws FileNotFoundException
    {
        System.setErr( new PrintStream( new File( "err.txt" ) ) );
        Server s = new Server();
        s.listenSocket();
        // testowanie czy zapisuje sie w trustKeyStore
        // try{
        // KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
        // FileInputStream fis = new
        // FileInputStream("src/server/config/Trusted");
        // ks.load(fis, "".toCharArray());
        // Enumeration<String> e = ks.aliases();
        // for (; e.hasMoreElements();){
        // String alias = (String) e.nextElement();
        // System.out.println(alias + " " +
        // ((X509Certificate)ks.getCertificate(alias)).getSubjectDN().toString());
        // }
        // } catch (Exception e){
        // e.printStackTrace();
        // }
    }
}
